package cn.piesat.scanning.service.impl;


import cn.piesat.scanning.dao.DbDmsSchedulerTaskFileRecordFlowDAO;
import cn.piesat.scanning.dto.DbDmsSchedulerTaskFileRecordFlowDTO;
import cn.piesat.scanning.service.DbDmsSchedulerTaskFileRecordFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author xhl
 */
@Service
public class DbDmsSchedulerTaskFileRecordFlowServiceImpl implements DbDmsSchedulerTaskFileRecordFlowService {

    @Autowired
    private DbDmsSchedulerTaskFileRecordFlowDAO dbDmsSchedulerTaskFileRecordFlowDAO;


    @Override
    public void save(DbDmsSchedulerTaskFileRecordFlowDTO dto) {
        try {
            dbDmsSchedulerTaskFileRecordFlowDAO.save(dto);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public DbDmsSchedulerTaskFileRecordFlowDTO findByRid(String rid) {
        return dbDmsSchedulerTaskFileRecordFlowDAO.findByRid(rid);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteByRid(String rid) {
        dbDmsSchedulerTaskFileRecordFlowDAO.deleteByRid(rid);
    }

}
